package com.raincat.tools.multimediapickertools.utils;

import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;

/**
 * <pre>
 *     author : RainCat
 *     e-mail : nining377@gmail.com
 *     time   : 2022/02/28
 *     desc   : 滚动缓慢的GridView
 *     version: 1.0
 * </pre>
 */

public class SlowGridView extends GridView {
    public SlowGridView(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

    public SlowGridView(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    public SlowGridView(Context context) {
        super(context);
    }

    /**
     * 滑动事件
     */
    @Override
    public void fling(int velocityY) {
        super.fling((int) (velocityY / 1.5));
    }
}
